home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1997 / MacHack 1997.toast / Hacks / Hacks ’96 / PredatorPrey / PredatorPreyData.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-06-22  |  1.7 KB  |  54 lines  |  [TEXT/KAHL]

  1. /* PredatorPreyData.h -- application-specific data management */
  2.  
  3. #ifndef __C14D__
  4. #define __C14D__
  5.  
  6. /* Define the creator type and file type for your application. */
  7.  
  8. #define kSignature    'INRS'
  9. #define kFileType        'INRP'
  10. #define lFileType        'INRC'
  11. #define mFileType        'TEXT'
  12.  
  13.  
  14. /* Define any appropriate data structures for your application. */
  15. /* Add any needed fields to Global's WinInfoRec so that each window */
  16. /* can have its own set of data. Your functions will use "cur->" */
  17. /* to access the data. Here, in the interface section, you should */
  18. /* define only those types which are intended to be visible to */
  19. /* modules outside this one. Later, in the implementation section, */
  20. /* you can define additional "private" data structures. */
  21.  
  22. typedef struct {
  23.         short        data;
  24.     } YourStuff;
  25.  
  26. /*----------*/
  27. /* Open, Close, Read, Write, Init, and Dispose are called by the */
  28. /* AppMaker-generated FileM module to do application-specific file accessing. */
  29.  
  30. void    C14Data_seg        (void);
  31.  
  32. Boolean    OpenAppFile        (short        vRefNum,
  33.                          Str255        fName,
  34.                          short        *fRefNum);
  35. void        CloseAppFile    (short        fRefNum);
  36. void        ReadAppFile     (short        fRefNum);
  37. void        WriteAppFile    (short        type,    short        fRefNum);
  38. void        InitAppData        (void);
  39. void        InitMapData        (Str255 *fName, short refNum, short qRefNum);
  40. void        DisposeAppData    (void);
  41. void        ErrorAlert        (char    *p0);
  42.  
  43. /* These functions are for accessing your data as logical chunks. */
  44. /* They are just models for your own accessor functions; */
  45. /* they aren't called by any AppMaker-generated code. */
  46. /* Replace them with whatever is suitable for your application. */
  47.  
  48. void    AddStuff        (YourStuff        *stuff);
  49. void    DeleteStuff        (void);
  50. Boolean    GetStuff        (void);
  51. short    YesNoCancel        (char            *thePrompt,
  52.                                          short            theDefault);
  53.  
  54. #endif    /*    __C14D__    */